package org.lemon.transport.context.service.queue.setting;

import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Setter
@Component
public class QueueTransportAuthApiSettings {

    private String tokenAuthRequestsTopic = "transport.auth.token.requests";

    private String tokenAuthResponsesTopic = "transport.auth.token.responses";

    private String x509CertAuthRequestsTopic = "transport.x509Cert.token.requests";

    private String x509CertAuthResponsesTopic = "transport.x509Cert.token.responses";

    private String mqttCredAuthRequestsTopic = "transport.auth.mqtt.requests";

    private String mqttCredAuthResponsesTopic = "transport.auth.mqtt.responses";

    private int maxPendingRequests = 10000;

    private int maxRequestsTimeout = 10000;

    @Value("${queue.transport_auth.max_callback_threads}")
    private int maxCallbackThreads;

    private long requestPollInterval = 25;

    private long responsePollInterval = 25;

    public String getTokenAuthRequestsTopic() {
        return tokenAuthRequestsTopic;
    }

    public String getTokenAuthResponsesTopic() {
        return tokenAuthResponsesTopic;
    }

    public String getX509CertAuthRequestsTopic() {
        return x509CertAuthRequestsTopic;
    }

    public String getX509CertAuthResponsesTopic() {
        return x509CertAuthResponsesTopic;
    }

    public String getMqttCredAuthRequestsTopic() {
        return mqttCredAuthRequestsTopic;
    }

    public String getMqttCredAuthResponsesTopic() {
        return mqttCredAuthResponsesTopic;
    }

    public int getMaxPendingRequests() {
        return maxPendingRequests;
    }

    public int getMaxRequestsTimeout() {
        return maxRequestsTimeout;
    }

    public int getMaxCallbackThreads() {
        return maxCallbackThreads;
    }

    public long getRequestPollInterval() {
        return requestPollInterval;
    }

    public long getResponsePollInterval() {
        return responsePollInterval;
    }
}
